<!--
 * @Descripttion: 后台管理系统
 * @version: 1.0
 * @Author: 狸猫
 * @Date: 2023-10-14 17:34:25
 * @LastEditors: 狸猫
 * @LastEditTime: 2023-12-25 13:41:00
-->
<template>
  <div class="app-container home">
    <div class="statistics-box">
      <div class="item" v-for="(item, index) in statistics" :key="index">
        <div class="title">
          <span>{{ item.title }}</span>
           <el-tag type="primary">今日</el-tag>
        </div>
        <div class="num">
          {{ item.num }}<span class="units">{{ item.units }}</span>
        </div>
        <el-divider></el-divider>
      </div>
    </div>
    <upload-picture
      v-if="visible"
      :checkedMore="imageList"
      :isMore="isMore"
      @getImage="getImage"
    ></upload-picture>
  </div>
</template>

<script>
import uploadPicture from "@/components/base/uploadPicture";
export default {
  name: "Index",
  data() {
    return {
      // 版本号
      version: "3.8.6",
      image: "",
      visible: false,
      callback: function () {},
      isMore: "",
      imageList: [],
      statistics: [
        {
          title: "小区总数量",
          key: "key",
          num: 31,
          units: "个",
        },
        {
          title: "总建筑面积",
          key: "key",
          num: 30361.0,
          units: "万㎡",
        },
        {
          title: "总占地面积",
          key: "key",
          num: 7789.0,
          units: "万㎡",
        },
        {
          title: "楼房总栋数",
          key: "key",
          num: 62,
          units: "栋",
        },
        {
          title: "单元总数",
          key: "key",
          num: 96,
          units: "个",
        },
        {
          title: "总人口数",
          key: "key",
          num: 93330,
          units: "人",
        },
        {
          title: "机动车位",
          key: "key",
          num: 7511,
          units: "个",
        },
        {
          title: "非机动车位",
          key: "key",
          num: 18634,
          units: "个",
        },
      ],
    };
  },
  components: {
    uploadPicture,
  },
  methods: {
    //选择图片回调
    getImage() {},
    goTarget(href) {
      window.open(href, "_blank");
    },
  },
};
</script>

<style scoped lang="scss">
.home {
  background-color: #f0f2f5;
  min-height: 90vh;
  blockquote {
    padding: 10px 20px;
    margin: 0 0 20px;
    font-size: 17.5px;
    border-left: 5px solid #eee;
  }
  hr {
    margin-top: 20px;
    margin-bottom: 20px;
    border: 0;
    border-top: 1px solid #eee;
  }
  .col-item {
    margin-bottom: 20px;
  }

  ul {
    padding: 0;
    margin: 0;
  }

  font-family: "open sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 13px;
  color: #676a6c;
  overflow-x: hidden;

  ul {
    list-style-type: none;
  }

  h4 {
    margin-top: 0px;
  }

  h2 {
    margin-top: 10px;
    font-size: 26px;
    font-weight: 100;
  }

  p {
    margin-top: 10px;

    b {
      font-weight: 700;
    }
  }

  .update-log {
    ol {
      display: block;
      list-style-type: decimal;
      margin-block-start: 1em;
      margin-block-end: 1em;
      margin-inline-start: 0;
      margin-inline-end: 0;
      padding-inline-start: 40px;
    }
  }
}
.statistics-box {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  row-gap: 30px;
  column-gap: 20px;
  .item {
    background-color: #ffffff;
    height: 180px;
    padding: 25px;
    .title {
      color: #333;
      font-size: 14px;
      font-weight: 500;
      display: flex;
      justify-content: space-between;
      margin-bottom: 20px;
    }
    .num {
      font-size: 30px;
      font-weight: 600;
      font-family: PingFangSC-Semibold, PingFang SC;
      color: #333;
      display: flex;
      align-items: flex-end;
      .units {
        color: #333;
        font-size: 14px;
        font-weight: 500;
        margin-left: 10px;
        margin-bottom: 5px;
      }
    }
  }
}
</style>
